<?
if(!defined ('U_MOD'))
{
	echo"<meta http-equiv='refresh' content='0;url=/index.php'>";
	exit;
}

if (isset($umk) && !empty($umk))
{
	if (is_dir('mod/'.$umk))
	{
		if (!isset ($upk) || empty($upk) || $upk=='index.php')
			$CENTER='mod/'.$umk.'/index.php';
		else
		{
			if (file_exists('mod/'.$umk.'/'.$upk.'.php'))
				$CENTER='mod/'.$umk.'/'.$upk.'.php';
			else
			{
				echo "<meta http-equiv='refresh' content='0;url=/index.php?umk=error&act=404'>";
				exit;
			}
		}
	}else
	{
		echo "<meta http-equiv='refresh' content='0;url=/index.php?umk=error&act=404'>";
		exit;
	}
}elseif (isset($amk) && !empty($amk))
{
	if (is_dir('admin/'.$amk))
	{
		if (!isset ($apk) || empty($apk) || $apk=='index.php')
			$CENTER='admin/'.$amk.'/index.php';
		else
		{
			if (file_exists('admin/'.$amk.'/'.$apk.'.php'))
				$CENTER='admin/'.$amk.'/'.$apk.'.php';
			else
			{
				echo "<meta http-equiv='refresh' content='0;url=/index.php?umk=error&act=404'>";
				exit;
			}
		}
	}else
	{
		echo "<meta http-equiv='refresh' content='0;url=/index.php?umk=error&act=404'>";
		exit;
	}
}else
{
	if (strstr($_SERVER['PHP_SELF'],'admin.php'))
		$CENTER='admin/default/index.php';
	else
		$CENTER='mod/default/index.php';
}
?>